package com.example.excelzip.mapper;

import com.example.excelzip.domain.User;
import org.springframework.stereotype.Component;

import java.util.LinkedList;
import java.util.List;

/**
 * @author 陈浩
 * @date 2021/4/14 8:54
 */
@Component
public class UserMapper {

    private static int a = 0;

    public List<User> selectList() {

        ++a;

        LinkedList<User> users = new LinkedList<>();
        if (a != 3) {
            for (int i = 0; i < 5000; i++) {
                users.add(new User(i, "顶顶顶"+i));
            }
        } else {
            for (int i = 0; i < 2399; i++) {
                users.add(new User(i, "顶顶顶"+i));
            }
        }
        return users;
    }
}
